package com.tanhua.db.api;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.db.mapper.BlackListMapper;
import com.tanhua.db.mapper.UserInfoMapper;
import com.tanhua.dubbo.api.BlackListApi;
import com.tanhua.model.pojo.BlackList;
import com.tanhua.model.pojo.UserInfo;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class BlackListApiImpl implements BlackListApi {
    @Autowired
    BlackListMapper blackListMapper;

    @Override
    public void removeBlackList(Long userId, long id) {
        blackListMapper.delete(Wrappers.lambdaQuery(BlackList.class)
                .eq(BlackList::getUserId,userId)
                .eq(BlackList::getBlackUserId,id));
    }
}
